Many modern electronic devices consume very low power and can maintain operation on a single battery charge for months or possibly even years, and other devices can maintain operation using power sources such as photoelectric cells if energy is available to be harvested to power the device. For devices using harvestable energy, a device is often provided with a backup battery. In prior-art devices with a battery, the battery may discharge. If a non-rechargeable battery discharges, it must be replaced. If a rechargeable battery charges, it may be recharged, but if a rechargeable battery remains discharged for a long time, it may fail irrecoverably, or at least lose a portion of its charge capacity.